<?php
require_once (__DIR__ . '/../inc/functions.php');
	if(isset($_REQUEST['ajax'])):
		include(__DIR__ . "/$_GET[controller]/$_GET[action].php");
	else:
  
  $controller = empty($_GET['controller']) ? 'Home' : $_GET['controller'];
  $action = empty($_GET['action']) ? 'index' : $_GET['action'];
?>
<!doctype html>
<!--[if lt IE 8]><html class="ie ie7" lang="en"><![endif]-->
<!--[if IE 8]>   <html class="ie ie8" lang="en"><![endif]-->
<!--[if (gt IE 8)|!(IE)]><!-->
<html lang="en">
<!--<![endif]-->
  <? include(__DIR__ . '/../inc/head.php'); ?>
  <body>
    <div>
      <? include(__DIR__ . '/../inc/nav.php'); ?>

      <div id="content">
        <?php
        include(__DIR__ . "/$controller/$action.php");
        include(__DIR__ . '/../inc/top-content.php');
        ?>
      </div>
      <? include(__DIR__ . '/../inc/footer.php'); ?>
    </div>
  </body>
</html>
<? endif; ?>